﻿using Pattern22命令模式.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pattern22命令模式.Models
{
    /// <summary>
    /// 太监
    /// </summary>
    public class Invoker
    {
        private CommandBase Command;//圣旨

        public void SetCommand(CommandBase Command)
        {
            this.Command = Command;
        }

        /// <summary>
        /// 宣读圣旨
        /// </summary>
        public void Reading()
        {
            Command.Execute();//触发圣旨
        }

    }
}
